package com.prb.consumer.bean;

import com.prb.api.service.HelloService;
import com.prb.api.service.WorldService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Component;

@Component
public class ConsumerComponent {

    //@Reference(mock = "force:return 1234")
    @Reference(layer = "true")
    private HelloService helloService;

    @Reference
    private WorldService worldService;

    public String sayHello(String name, int timeToWait) {

        worldService.sayWorld("world");
        return helloService.sayHello(name);
    }

}
